# Maintainer: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=eom
pkgver=1.26.0
pkgrel=1
pkgdesc="An image viewing and cataloging program for MATE"
url="https://mate-desktop.org"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('dbus-glib' 'gobject-introspection-runtime' 'gettext' 'exempi' 'lcms2' 'libexif' 'libjpeg-turbo' 'mate-desktop' 'libpeas')
makedepends=('gobject-introspection' 'itstool')
groups=('mate-extra')
conflicts=('eom-gtk3')
replaces=('eom-gtk3')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('27f169aa396ddbc75740bf802bef1c0251771ca0747b5a727ff985c03dc067db')

build() {
    	cd "${pkgname}-${pkgver}"
    	./configure \
        	--prefix=/usr \
        	--localstatedir=/var \
        	--with-librsvg

    	#https://bugzilla.gnome.org/show_bug.cgi?id=656231
    	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    	make
}

package() {
    	cd "${pkgname}-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
